// import { createStore, applyMiddleware } from "redux";

// import thunk from "redux-thunk";
import { userSlice } from "./login/slice";
import { userDetailSlice } from "./userInfo/slice";
import { listDetailSlice } from "./list/slice";
import { combineReducers, configureStore } from "@reduxjs/toolkit";
import { musicInfoSlice } from "./musicInfo/slice";
import { playerSlice } from "./player/slice";
const rootReducer = combineReducers({
  user: userSlice.reducer,
  userDetail: userDetailSlice.reducer,
  listDetail: listDetailSlice.reducer,
  musicInfoSlice: musicInfoSlice.reducer,
  playerSlice: playerSlice.reducer,
});

// const store = createStore(rootReducer, applyMiddleware(thunk, actionLog));
const store = configureStore({
  reducer: rootReducer,
  middleware: (getDefaultMiddleware) => [...getDefaultMiddleware()],
  devTools: true,
});

export type RootState = ReturnType<typeof store.getState>;

export default store;
